fuly allocated.
netif_carrier_off() causes events to be queued on the device so if we
subsequently abort the allocation (e.g. due to lack of grant entries)
then we crash trying to access the now invalid device.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
np = netdev_priv(netdev);
np->xbdev = dev;
- netif_carrier_off(netdev);
-
spin_lock_init(&np->tx_lock);
spin_lock_init(&np->rx_lock);
SET_NETDEV_DEV(netdev, &dev->dev);
np->netdev = netdev;
+
+ netif_carrier_off(netdev);
+
return netdev;
exit_free_tx: